import request from '@/utils/request'

export function getToken(query) {
  return request({
    url: 'auth/oauth/token',
    method: 'POST',
    data: query
  })
}

export function getRefreshToken(query) {
  return request({
    url: 'auth/oauth/token',
    method: 'post',
    params: query
  })
}

export function logout(query) {
  return request({
    url: 'auth/oauth/logout',
    method: 'post',
    params: query
  })
}

export function init(params) {
  return request({
    // url: `/sysm/init/`,
    url: `/sysm/menu/init`,
    method: 'get',
    params: params
  })
}
